    <ul>
    <!-- First page link -->
    <?php if (isset($this->previous)): ?>
         <li class="first"><a href="<?php echo $this->url(array('page' => $this->first)); ?>">First</a></li>
    <?php else: ?>
         <li class="first"><a href="#">First</a></li>
    <?php endif; ?>

    <!-- Previous page link -->
    <?php if (isset($this->previous)): ?>
         <li class="prev"><a href="<?php echo $this->url(array('page' => $this->previous)); ?>"> Previous</a></li>
    <?php else: ?>
        <li class="prev"><a href="#"> Previous</a></li>
    <?php endif; ?>

    <!-- Numbered page links -->
    <?php foreach ($this->pagesInRange as $page): ?>
        <?php if ($page != $this->current): ?>
            <li><a href="<?php echo $this->url(array('page' => $page)); ?>"><?php echo $page; ?></a></li>
        <?php else: ?>
            <li class="active"><a href="#"><?php echo $page; ?></a></li>
        <?php endif; ?>
    <?php endforeach; ?>

    <!-- Next page link -->
    <?php if (isset($this->next)): ?>
           <li class="next"><a href="<?php echo $this->url(array('page' => $this->next)); ?>">Next </a></li>
    <?php else: ?>
           <li class="next"><a href="#" >Next </a></li>
    <?php endif; ?>

    <!-- Last page link -->
    <?php if (isset($this->next)): ?>
          <li class="first"><a href="<?php echo $this->url(array('page' => $this->last)); ?>">Last</a></li>
    <?php else: ?>
        <li class="first"><a href="#">Last</a></li>
    <?php endif; ?>
        <li class="last"><a>Page <?php echo  $this->current; ?> of <?php echo $this->last; ?></a></li>
    </ul>